package com.eshop.modules.system.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

@TableName("roles_menus")
public class RolesMenus implements Serializable
{
    private Long menuId;
    private Long roleId;
    
    public void copy(final RolesMenus source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public Long getMenuId() {
        return this.menuId;
    }
    
    public Long getRoleId() {
        return this.roleId;
    }
    
    public void setMenuId(final Long menuId) {
        this.menuId = menuId;
    }
    
    public void setRoleId(final Long roleId) {
        this.roleId = roleId;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof RolesMenus)) {
            return false;
        }
        final RolesMenus other = (RolesMenus)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$menuId = this.getMenuId();
        final Object other$menuId = other.getMenuId();
        Label_0065: {
            if (this$menuId == null) {
                if (other$menuId == null) {
                    break Label_0065;
                }
            }
            else if (this$menuId.equals(other$menuId)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$roleId = this.getRoleId();
        final Object other$roleId = other.getRoleId();
        if (this$roleId == null) {
            if (other$roleId == null) {
                return true;
            }
        }
        else if (this$roleId.equals(other$roleId)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof RolesMenus;
    }
    
    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $menuId = this.getMenuId();
        result = result * 59 + (($menuId == null) ? 43 : $menuId.hashCode());
        final Object $roleId = this.getRoleId();
        result = result * 59 + (($roleId == null) ? 43 : $roleId.hashCode());
        return result;
    }
    
    @Override
    public String toString() {
        return "RolesMenus(menuId=" + this.getMenuId() + ", roleId=" + this.getRoleId() + ")";
    }
}
